import request from '@/utils/request'

export const getSupplierBrandList = (data: any) => {
  return request({
    url: '/supplier/brand/list',
    method: 'get',
    params: data,
  })
}

// 删除记录
export const deleteSupplierBrand = (data) => {
  return request({
    url: `/supplier/brand/del`,
    method: 'post',
    data,
  })
}

// 申请品牌区域
export const addBrandArea = (data) => {
  return request({
    url: `/supplier/brand/add`,
    method: 'post',
    data,
  })
}

// 获取所有的品牌数据
export const getallAdminBrandList = () => {
  return request({
    url: `/supplier/brand/getAllBrand`,
    method: 'get',
  })
}

// 获取地区数据 默认不传获取省份数据
export const getCityAreaList = (data) => {
  return request({
    url: `/supplier/area/getArea`,
    method: 'get',
    params: data,
  })
}

// 重新请求品牌区域
export const reGetBrandArea = (data) => {
  return request({
    url: `/supplier/brand/reApply`,
    method: 'post',
    data,
  })
}

// 供应商申请记录
export const getSupplierApplyList = (data) => {
  return request({
    url: `/supplier/system_brand/list`,
    method: 'get',
    params: data,
  })
}
// 供应商申请品牌到总后台
export const supplierApplyBrandAdd = (data) => {
  return request({
    url: `/supplier/system_brand/save`,
    method: 'post',
    data,
  })
}

// 获取品牌申请信息
export const getBrandApplyInfo = (data) => {
  return request({
    url: `/supplier/system_brand/info`,
    method: 'get',
    params: data,
  })
}
